package com.interview.item.javabase.mvcFilter;


import org.springframework.boot.web.servlet.ServletComponentScan;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;

/**
 * @Author:zxh
 * @Description: 启动类中加个@ServletComponentScan  servlet的过滤和监听
 * @Date: 2020/8/25
 * @Modified By:
 */

@WebFilter(filterName = "setCharactEncodingFilter",urlPatterns = "/*")
public class setCharactEncodingFilter implements Filter {

    @Override
    public void init(FilterConfig filterConfig) throws ServletException {

    }

    @Override
    public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
    //业务处理

    }

    @Override
    public void destroy() {

    }
}
